package com.sunxu.ioc.domain;

import org.springframework.beans.factory.FactoryBean;

/**
 * @author 孙许
 * @version 1.0
 * @date 2020/4/12 3:40 下午
 */
public class ImportantUser extends User implements FactoryBean {

    private boolean vip;

    @Override
    public Object getObject() throws Exception {
        ImportantUser importantUser = new ImportantUser();
        importantUser.setId(3L);
        importantUser.setName("laoniao");
        importantUser.setVip(true);
        return importantUser;
    }

    @Override
    public Class<?> getObjectType() {
        return null;
    }

    public boolean isVip() {
        return vip;
    }

    public void setVip(boolean vip) {
        this.vip = vip;
    }

    @Override
    public String toString() {
        return "ImportantUser{" +
                "vip=" + vip +
                "} " + super.toString();
    }
}
